<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Git工作流深度解析 - 现代软件开发的核心实践</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        .hero-title {
            font-family: 'Noto Serif SC', serif;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
        }
        .section-title {
            font-family: 'Noto Serif SC', serif;
            position: relative;
            padding-bottom: 10px;
        }
        .section-title:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 60px;
            height: 3px;
            background: linear-gradient(90deg, #3b82f6, #8b5cf6);
        }
        .card {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
        }
        .comparison-table {
            border-collapse: separate;
            border-spacing: 0;
        }
        .comparison-table th {
            position: sticky;
            top: 0;
            background-color: white;
            box-shadow: 0 2px 0 0 #e5e7eb;
        }
        .comparison-table tr:not(:last-child) td {
            border-bottom: 1px solid #e5e7eb;
        }
        .highlight {
            background: linear-gradient(90deg, #f0f9ff, #e0f2fe);
            padding: 2px 6px;
            border-radius: 4px;
        }
        .mermaid {
            background: white;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
        }
        .feature-icon {
            color: #3b82f6;
            font-size: 1.5rem;
            margin-bottom: 1rem;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="relative bg-gradient-to-r from-blue-600 to-indigo-700 text-white py-20 px-4 md:px-0 overflow-hidden">
        <div class="absolute inset-0 opacity-20">
            <div class="absolute inset-0 bg-gradient-to-br from-transparent to-black opacity-50"></div>
        </div>
        <div class="container mx-auto relative z-10 max-w-5xl">
            <div class="text-center">
                <h1 class="hero-title text-4xl md:text-6xl font-bold mb-6">Git工作流深度解析</h1>
                <p class="text-xl md:text-2xl font-light mb-8 max-w-3xl mx-auto">现代软件开发中三种核心版本控制策略的比较与实践</p>
                <div class="flex justify-center space-x-4">
                    <a href="#comparison" class="bg-white text-blue-600 hover:bg-blue-50 px-6 py-3 rounded-lg font-medium transition duration-300 shadow-md">
                        <i class="fas fa-balance-scale-left mr-2"></i>对比分析
                    </a>
                    <a href="#selection" class="bg-blue-700 hover:bg-blue-800 px-6 py-3 rounded-lg font-medium transition duration-300 shadow-md border border-blue-600">
                        <i class="fas fa-check-circle mr-2"></i>选择指南
                    </a>
                </div>
            </div>
        </div>
    </section>

    <!-- Introduction -->
    <section class="py-16 px-4 md:px-0">
        <div class="container mx-auto max-w-5xl">
            <div class="bg-white rounded-xl shadow-md p-8 md:p-10">
                <p class="text-lg md:text-xl text-gray-700 leading-relaxed">
                    在现代软件开发中，版本控制是团队协作的核心工具之一。<span class="font-semibold text-blue-600">Git</span>作为最流行的版本控制系统，支持多种工作流模式，其中<span class="highlight font-medium">Git Flow</span>、<span class="highlight font-medium">GitHub Flow</span>和<span class="highlight font-medium">Trunk-Based Development (TBD)</span>是最常见的三种。每种工作流都有其独特的优势和适用场景。
                </p>
            </div>
        </div>
    </section>

    <!-- Git Flow Section -->
    <section class="py-16 px-4 md:px-0 bg-white">
        <div class="container mx-auto max-w-5xl">
            <h2 id="git-flow" class="section-title text-3xl font-bold mb-10">1. Git Flow：经典的分支模型</h2>
            
            <!-- What is Git Flow -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold mb-4 flex items-center">
                    <i class="fas fa-question-circle text-blue-500 mr-3"></i>
                    1.1 什么是 Git Flow？
                </h3>
                <p class="text-gray-700 mb-6">
                    Git Flow 是由 Vincent Driessen 提出的一种分支模型，适用于需要严格版本控制和发布管理的项目。它的核心思想是通过不同的分支来管理开发、发布和修复流程。
                </p>
                
                <!-- Branch Diagram -->
                <div class="mermaid mb-8">
                    gitGraph
                        commit
                        branch develop
                        checkout develop
                        commit
                        branch feature-1
                        checkout feature-1
                        commit
                        commit
                        checkout develop
                        merge feature-1
                        branch release-1.0
                        checkout release-1.0
                        commit
                        checkout main
                        merge release-1.0
                        checkout develop
                        merge release-1.0
                        branch hotfix-1.0.1
                        checkout hotfix-1.0.1
                        commit
                        checkout main
                        merge hotfix-1.0.1
                        checkout develop
                        merge hotfix-1.0.1
                </div>
                
                <div class="grid md:grid-cols-2 gap-8">
                    <div>
                        <h4 class="text-xl font-semibold mb-4 flex items-center">
                            <i class="fas fa-code-branch text-blue-500 mr-3"></i>
                            1.2 分支结构
                        </h4>
                        <ul class="space-y-3">
                            <li class="flex items-start">
                                <span class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0"><i class="fas fa-check text-xs"></i></span>
                                <span><strong>主分支（main/master）</strong>：用于发布稳定版本</span>
                            </li>
                            <li class="flex items-start">
                                <span class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0"><i class="fas fa-check text-xs"></i></span>
                                <span><strong>开发分支（develop）</strong>：用于集成新功能</span>
                            </li>
                            <li class="flex items-start">
                                <span class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0"><i class="fas fa-check text-xs"></i></span>
                                <span><strong>功能分支（feature）</strong>：从 <code class="bg-gray-100 px-1 rounded">develop</code> 分支创建，用于开发单个功能</span>
                            </li>
                            <li class="flex items-start">
                                <span class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0"><i class="fas fa-check text-xs"></i></span>
                                <span><strong>发布分支（release）</strong>：从 <code class="bg-gray-100 px-1 rounded">develop</code> 分支创建，用于准备发布版本</span>
                            </li>
                            <li class="flex items-start">
                                <span class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0"><i class="fas fa-check text-xs"></i></span>
                                <span><strong>热修复分支（hotfix）</strong>：从 <code class="bg-gray-100 px-1 rounded">main</code> 分支创建，用于紧急修复</span>
                            </li>
                        </ul>
                    </div>
                    
                    <div>
                        <h4 class="text-xl font-semibold mb-4 flex items-center">
                            <i class="fas fa-project-diagram text-blue-500 mr-3"></i>
                            1.3 工作流程
                        </h4>
                        <ol class="space-y-3 list-decimal list-inside">
                            <li class="pl-2">从 <code class="bg-gray-100 px-1 rounded">develop</code> 分支创建 <code class="bg-gray-100 px-1 rounded">feature</code> 分支，开发新功能</li>
                            <li class="pl-2">功能完成后，将 <code class="bg-gray-100 px-1 rounded">feature</code> 分支合并回 <code class="bg-gray-100 px-1 rounded">develop</code> 分支</li>
                            <li class="pl-2">准备发布时，从 <code class="bg-gray-100 px-1 rounded">develop</code> 分支创建 <code class="bg-gray-100 px-1 rounded">release</code> 分支，进行测试和修复</li>
                            <li class="pl-2">发布完成后，将 <code class="bg-gray-100 px-1 rounded">release</code> 分支合并到 <code class="bg-gray-100 px-1 rounded">main</code> 和 <code class="bg-gray-100 px-1 rounded">develop</code> 分支</li>
                            <li class="pl-2">如果发现生产环境的问题，从 <code class="bg-gray-100 px-1 rounded">main</code> 分支创建 <code class="bg-gray-100 px-1 rounded">hotfix</code> 分支，修复后合并回 <code class="bg-gray-100 px-1 rounded">main</code> 和 <code class="bg-gray-100 px-1 rounded">develop</code> 分支</li>
                        </ol>
                    </div>
                </div>
            </div>
            
            <!-- Use Cases and Pros/Cons -->
            <div class="grid md:grid-cols-2 gap-8">
                <div class="card bg-gray-50 p-6 rounded-lg border border-gray-200">
                    <h4 class="text-xl font-semibold mb-4 flex items-center">
                        <i class="fas fa-lightbulb text-blue-500 mr-3"></i>
                        1.4 适用场景
                    </h4>
                    <ul class="space-y-2">
                        <li class="flex items-start">
                            <span class="text-blue-500 mr-2">•</span>
                            <span><strong>需要严格版本控制的项目</strong>：如传统软件或企业级应用</span>
                        </li>
                        <li class="flex items-start">
                            <span class="text-blue-500 mr-2">•</span>
                            <span><strong>长期发布周期</strong>：如每月或每季度发布一次</span>
                        </li>
                    </ul>
                </div>
                
                <div class="card bg-gray-50 p-6 rounded-lg border border-gray-200">
                    <h4 class="text-xl font-semibold mb-4 flex items-center">
                        <i class="fas fa-balance-scale text-blue-500 mr-3"></i>
                        1.5 优缺点
                    </h4>
                    <div class="grid grid-cols-2 gap-4">
                        <div>
                            <h5 class="font-medium text-green-600 mb-2">优点</h5>
                            <p>结构清晰，适合复杂项目</p>
                        </div>
                        <div>
                            <h5 class="font-medium text-red-600 mb-2">缺点</h5>
                            <p>分支较多，流程复杂，可能导致合并冲突</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- GitHub Flow Section -->
    <section class="py-16 px-4 md:px-0 bg-gray-50">
        <div class="container mx-auto max-w-5xl">
            <h2 id="github-flow" class="section-title text-3xl font-bold mb-10">2. GitHub Flow：轻量级的持续交付模型</h2>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <h3 class="text-2xl font-semibold mb-4 flex items-center">
                        <i class="fab fa-github text-gray-800 mr-3"></i>
                        2.1 什么是 GitHub Flow？
                    </h3>
                    <p class="text-gray-700 mb-6">
                        GitHub Flow 是由 GitHub 提出的一种轻量级工作流，适用于需要快速迭代和持续交付的项目。它的核心思想是通过主分支和功能分支实现快速开发和部署。
                    </p>
                    
                    <div class="mermaid mb-6">
                        gitGraph
                            commit
                            branch feature-1
                            checkout feature-1
                            commit
                            commit
                            checkout main
                            merge feature-1
                            branch feature-2
                            checkout feature-2
                            commit
                            checkout main
                            merge feature-2
                    </div>
                    
                    <h4 class="text-xl font-semibold mb-4 flex items-center">
                        <i class="fas fa-code-branch text-gray-800 mr-3"></i>
                        2.2 分支结构
                    </h4>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <span class="bg-gray-200 text-gray-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0"><i class="fas fa-check text-xs"></i></span>
                            <span><strong>主分支（main）</strong>：始终可部署的稳定分支</span>
                        </li>
                        <li class="flex items-start">
                            <span class="bg-gray-200 text-gray-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0"><i class="fas fa-check text-xs"></i></span>
                            <span><strong>功能分支（feature）</strong>：从 <code class="bg-gray-100 px-1 rounded">main</code> 分支创建，用于开发新功能</span>
                        </li>
                    </ul>
                </div>
                
                <div>
                    <h4 class="text-xl font-semibold mb-4 flex items-center">
                        <i class="fas fa-project-diagram text-gray-800 mr-3"></i>
                        2.3 工作流程
                    </h4>
                    <ol class="space-y-3 list-decimal list-inside">
                        <li class="pl-2">从 <code class="bg-gray-100 px-1 rounded">main</code> 分支创建 <code class="bg-gray-100 px-1 rounded">feature</code> 分支，开发新功能</li>
                        <li class="pl-2">开发完成后，创建 Pull Request（PR），进行代码审查</li>
                        <li class="pl-2">通过审查后，将 <code class="bg-gray-100 px-1 rounded">feature</code> 分支合并到 <code class="bg-gray-100 px-1 rounded">main</code> 分支，并立即部署</li>
                    </ol>
                    
                    <div class="mt-8">
                        <h4 class="text-xl font-semibold mb-4 flex items-center">
                            <i class="fas fa-lightbulb text-gray-800 mr-3"></i>
                            2.4 适用场景
                        </h4>
                        <ul class="space-y-2">
                            <li class="flex items-start">
                                <span class="text-gray-700 mr-2">•</span>
                                <span><strong>快速迭代的项目</strong>：如互联网应用或 SaaS 产品</span>
                            </li>
                            <li class="flex items-start">
                                <span class="text-gray-700 mr-2">•</span>
                                <span><strong>持续交付</strong>：需要频繁发布新功能</span>
                            </li>
                        </ul>
                    </div>
                    
                    <div class="mt-8">
                        <h4 class="text-xl font-semibold mb-4 flex items-center">
                            <i class="fas fa-balance-scale text-gray-800 mr-3"></i>
                            2.5 优缺点
                        </h4>
                        <div class="grid grid-cols-2 gap-4">
                            <div>
                                <h5 class="font-medium text-green-600 mb-2">优点</h5>
                                <p>流程简单，适合快速开发和部署</p>
                            </div>
                            <div>
                                <h5 class="font-medium text-red-600 mb-2">缺点</h5>
                                <p>对代码质量和自动化测试要求较高</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- TBD Section -->
    <section class="py-16 px-4 md:px-0 bg-white">
        <div class="container mx-auto max-w-5xl">
            <h2 id="tbd" class="section-title text-3xl font-bold mb-10">3. Trunk-Based Development（TBD）：基于主干的开发</h2>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <h3 class="text-2xl font-semibold mb-4 flex items-center">
                        <i class="fas fa-code text-purple-600 mr-3"></i>
                        3.1 什么是 Trunk-Based Development？
                    </h3>
                    <p class="text-gray-700 mb-6">
                        Trunk-Based Development 是一种高度集成的开发模式，所有开发者都在一个主干分支（<code class="bg-gray-100 px-1 rounded">main</code>）上工作，通过短生命周期的功能分支或直接提交实现开发。
                    </p>
                    
                    <div class="mermaid mb-6">
                        gitGraph
                            commit
                            commit
                            commit
                            commit
                            commit
                            commit
                            commit
                    </div>
                    
                    <h4 class="text-xl font-semibold mb-4 flex items-center">
                        <i class="fas fa-code-branch text-purple-600 mr-3"></i>
                        3.2 分支结构
                    </h4>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <span class="bg-purple-100 text-purple-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0"><i class="fas fa-check text-xs"></i></span>
                            <span><strong>主干分支（main）</strong>：所有开发都在此分支上进行</span>
                        </li>
                        <li class="flex items-start">
                            <span class="bg-purple-100 text-purple-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0"><i class="fas fa-check text-xs"></i></span>
                            <span><strong>短生命周期分支（feature）</strong>：可选，用于开发复杂功能</span>
                        </li>
                    </ul>
                </div>
                
                <div>
                    <h4 class="text-xl font-semibold mb-4 flex items-center">
                        <i class="fas fa-project-diagram text-purple-600 mr-3"></i>
                        3.3 工作流程
                    </h4>
                    <ol class="space-y-3 list-decimal list-inside">
                        <li class="pl-2">开发者从 <code class="bg-gray-100 px-1 rounded">main</code> 分支拉取最新代码</li>
                        <li class="pl-2">开发新功能时，可以选择直接提交到 <code class="bg-gray-100 px-1 rounded">main</code> 分支，或创建短生命周期的 <code class="bg-gray-100 px-1 rounded">feature</code> 分支</li>
                        <li class="pl-2">功能完成后，立即合并到 <code class="bg-gray-100 px-1 rounded">main</code> 分支，并通过自动化测试和部署流程发布</li>
                    </ol>
                    
                    <div class="mt-8">
                        <h4 class="text-xl font-semibold mb-4 flex items-center">
                            <i class="fas fa-lightbulb text-purple-600 mr-3"></i>
                            3.4 适用场景
                        </h4>
                        <ul class="space-y-2">
                            <li class="flex items-start">
                                <span class="text-purple-600 mr-2">•</span>
                                <span><strong>高度集成的团队</strong>：如小型团队或初创公司</span>
                            </li>
                            <li class="flex items-start">
                                <span class="text-purple-600 mr-2">•</span>
                                <span><strong>持续集成和持续交付（CI/CD）</strong>：需要频繁集成和部署</span>
                            </li>
                        </ul>
                    </div>
                    
                    <div class="mt-8">
                        <h4 class="text-xl font-semibold mb-4 flex items-center">
                            <i class="fas fa-balance-scale text-purple-600 mr-3"></i>
                            3.5 优缺点
                        </h4>
                        <div class="grid grid-cols-2 gap-4">
                            <div>
                                <h5 class="font-medium text-green-600 mb-2">优点</h5>
                                <p>减少分支管理开销，促进快速集成</p>
                            </div>
                            <div>
                                <h5 class="font-medium text-red-600 mb-2">缺点</h5>
                                <p>对代码质量和自动化测试要求极高</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Comparison Section -->
    <section id="comparison" class="py-16 px-4 md:px-0 bg-gray-50">
        <div class="container mx-auto max-w-5xl">
            <h2 class="section-title text-3xl font-bold mb-10">4. 三种工作流的对比</h2>
            
            <div class="overflow-x-auto">
                <table class="comparison-table w-full bg-white rounded-lg overflow-hidden shadow-sm">
                    <thead>
                        <tr class="bg-gray-100">
                            <th class="text-left py-4 px-6 font-semibold text-gray-700">特性</th>
                            <th class="text-left py-4 px-6 font-semibold text-gray-700">Git Flow</th>
                            <th class="text-left py-4 px-6 font-semibold text-gray-700">GitHub Flow</th>
                            <th class="text-left py-4 px-6 font-semibold text-gray-700">Trunk-Based Development</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td class="py-4 px-6 font-medium">分支结构</td>
                            <td class="py-4 px-6">复杂（多分支）</td>
                            <td class="py-4 px-6">简单（主分支 + 功能分支）</td>
                            <td class="py-4 px-6">极简（主干分支）</td>
                        </tr>
                        <tr>
                            <td class="py-4 px-6 font-medium">发布频率</td>
                            <td class="py-4 px-6">低频（如每月）</td>
                            <td class="py-4 px-6">高频（如每天）</td>
                            <td class="py-4 px-6">极高（如每小时）</td>
                        </tr>
                        <tr>
                            <td class="py-4 px-6 font-medium">适用项目规模</td>
                            <td class="py-4 px-6">大型复杂项目</td>
                            <td class="py-4 px-6">中小型快速迭代项目</td>
                            <td class="py-4 px-6">小型高度集成团队</td>
                        </tr>
                        <tr>
                            <td class="py-4 px-6 font-medium">合并冲突风险</td>
                            <td class="py-4 px-6">较高</td>
                            <td class="py-4 px-6">中等</td>
                            <td class="py-4 px-6">较低</td>
                        </tr>
                        <tr>
                            <td class="py-4 px-6 font-medium">对自动化测试要求</td>
                            <td class="py-4 px-6">中等</td>
                            <td class="py-4 px-6">较高</td>
                            <td class="py-4 px-6">极高</td>
                        </tr>
                        <tr>
                            <td class="py-4 px-6 font-medium">学习曲线</td>
                            <td class="py-4 px-6">较高</td>
                            <td class="py-4 px-6">较低</td>
                            <td class="py-4 px-6">中等</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </section>

    <!-- Practical Applications -->
    <section class="py-16 px-4 md:px-0 bg-white">
        <div class="container mx-auto max-w-5xl">
            <h2 class="section-title text-3xl font-bold mb-10">5. 实际项目中的应用</h2>
            
            <div class="grid md:grid-cols-3 gap-8">
                <div class="card p-6 rounded-lg border border-gray-200">
                    <div class="feature-icon">
                        <i class="fas fa-building text-blue-500"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">5.1 Git Flow 的应用</h3>
                    <p class="text-gray-700">
                        在 <span class="font-medium">ts-enterprise</span> 项目中，团队使用 Git Flow 管理复杂的版本发布流程。每个功能都在独立的 <code class="bg-gray-100 px-1 rounded">feature</code> 分支上开发，并通过 <code class="bg-gray-100 px-1 rounded">release</code> 分支进行测试和发布。这种模式确保了版本的稳定性和可追溯性。
                    </p>
                </div>
                
                <div class="card p-6 rounded-lg border border-gray-200">
                    <div class="feature-icon">
                        <i class="fas fa-cloud text-gray-600"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">5.2 GitHub Flow 的应用</h3>
                    <p class="text-gray-700">
                        在 <span class="font-medium">ts-saas</span> 项目中，团队使用 GitHub Flow 实现快速迭代。每个功能都在短生命周期的 <code class="bg-gray-100 px-1 rounded">feature</code> 分支上开发，并通过 PR 进行代码审查和合并。这种模式支持每日多次部署，满足了客户对快速交付的需求。
                    </p>
                </div>
                
                <div class="card p-6 rounded-lg border border-gray-200">
                    <div class="feature-icon">
                        <i class="fas fa-rocket text-purple-600"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">5.3 Trunk-Based Development 的应用</h3>
                    <p class="text-gray-700">
                        在 <span class="font-medium">ts-startup</span> 项目中，团队使用 Trunk-Based Development 实现高度集成开发。所有开发者都在 <code class="bg-gray-100 px-1 rounded">main</code> 分支上工作，通过自动化测试和部署流程确保代码质量。这种模式减少了分支管理的开销，提高了开发效率。
                    </p>
                </div>
            </div>
        </div>
    </section>

    <!-- How to Choose -->
    <section id="selection" class="py-16 px-4 md:px-0 bg-gradient-to-r from-blue-50 to-indigo-50">
        <div class="container mx-auto max-w-5xl">
            <h2 class="section-title text-3xl font-bold mb-10">6. 如何选择合适的工作流？</h2>
            
            <div class="bg-white rounded-xl p-8 shadow-md">
                <p class="text-lg mb-6">
                    选择合适的工作流需要考虑以下因素：
                </p>
                
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="flex items-start">
                        <div class="bg-blue-100 text-blue-800 rounded-lg p-3 mr-4 flex-shrink-0">
                            <i class="fas fa-project-diagram text-xl"></i>
                        </div>
                        <div>
                            <h4 class="font-semibold text-lg mb-2">项目规模</h4>
                            <p class="text-gray-700">大型复杂项目适合 Git Flow，中小型项目适合 GitHub Flow 或 TBD</p>
                        </div>
                    </div>
                    
                    <div class="flex items-start">
                        <div class="bg-indigo-100 text-indigo-800 rounded-lg p-3 mr-4 flex-shrink-0">
                            <i class="fas fa-shipping-fast text-xl"></i>
                        </div>
                        <div>
                            <h4 class="font-semibold text-lg mb-2">发布频率</h4>
                            <p class="text-gray-700">低频发布适合 Git Flow，高频发布适合 GitHub Flow 或 TBD</p>
                        </div>
                    </div>
                    
                    <div class="flex items-start">
                        <div class="bg-purple-100 text-purple-800 rounded-lg p-3 mr-4 flex-shrink-0">
                            <i class="fas fa-users text-xl"></i>
                        </div>
                        <div>
                            <h4 class="font-semibold text-lg mb-2">团队结构</h4>
                            <p class="text-gray-700">高度集成的团队适合 TBD，分散的团队适合 Git Flow 或 GitHub Flow</p>
                        </div>
                    </div>
                    
                    <div class="flex items-start">
                        <div class="bg-green-100 text-green-800 rounded-lg p-3 mr-4 flex-shrink-0">
                            <i class="fas fa-robot text-xl"></i>
                        </div>
                        <div>
                            <h4 class="font-semibold text-lg mb-2">自动化程度</h4>
                            <p class="text-gray-700">自动化测试和部署能力强的团队适合 GitHub Flow 或 TBD</p>
                        </div>
                    </div>
                </div>
                
                <div class="mt-8 bg-blue-50 border-l-4 border-blue-500 p-4 rounded-r-lg">
                    <div class="flex">
                        <div class="flex-shrink-0 text-blue-500">
                            <i class="fas fa-info-circle text-xl"></i>
                        </div>
                        <div class="ml-3">
                            <p class="text-blue-700">
                                <strong>专业建议：</strong> 大多数现代Web应用开发团队会发现GitHub Flow是最佳平衡点，它提供了足够的结构而不至于过于复杂。对于需要频繁部署的微服务架构，可以考虑Trunk-Based Development。
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12 px-4">
        <div class="container mx-auto max-w-5xl">
            <div class="flex flex-col items-center">
                <div class="text-center">
                    <h3 class="text-xl font-semibold text-white mb-2">技术小馆</h3>
                    <p class="mb-4">探索技术之美，分享开发经验</p>
                    <a href="http://www.yuque.com/jtostring" class="text-blue-400 hover:text-blue-300 transition duration-300">
                        <i class="fas fa-globe mr-2"></i>http://www.yuque.com/jtostring
                    </a>
                </div>
                <div class="mt-8 text-sm text-gray-500">
                    &copy; 2023 技术小馆. 保留所有权利.
                </div>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            gitGraph: {
                mainBranchName: 'main',
                showCommitLabel: false,
                rotateCommitLabel: false
            }
        });
        
        // Smooth scrolling for anchor links
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                
                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });
    </script>
</body>
</html>